﻿using HYRN.Common.Style;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Oliving.FormCommon.Oliving.Common
{
  


    public static class WinFormStyle
    {


        public static void InitDataGridViewStyle(DataGridView dgv, bool bo = true)
        {


            dgv.AllowUserToAddRows = false;
            dgv.AutoGenerateColumns = false;
            dgv.ReadOnly = true;
            dgv.RowHeadersVisible = false;


            dgv.AllowUserToAddRows = false;

            // 行颜色
            dgv.RowsDefaultCellStyle.BackColor = Color.White;
            // 奇数行颜色
            dgv.AlternatingRowsDefaultCellStyle.BackColor = HelperColor.ToColor("#e0e2e6"); ;
            // 鼠标选中 整行
            dgv.SelectionMode = DataGridViewSelectionMode.FullRowSelect;

        }
        public static void InitDataGridViewStyle_Base(DataGridView dgv, bool bo = true)
        {


            dgv.AllowUserToAddRows = false;
            dgv.AutoGenerateColumns = false;
            dgv.ReadOnly = true;
            dgv.RowHeadersVisible = false;


        }

    }



}
